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W2Z1suR/XfqUj5peqFJgbLx
75SVTOeHUQXQvNb0N9oKaiGLUgym3NjTrWvj2rcCgYEAtpxpQBGMH4Zz27B7SRqL
02h2UGH2KjkTJZt7kFYFkz3J8ICU4HYNDgMcmc4vvH7mSJ2WvZR8NtoBdrZU/CEi
YbeGadQAVEfqdZQJqoC1a5HlI1p9IYcOBmaxmAfVSj85jdCLWt7xG/f4pDdgz3gn
zvqckVUdVEHybRbBavWUJgUCgYBg1NuR8QDUID9CFcM+wTJjWOEqWfqhgXMSnwCp
Y2nLOGbA3JZBLAA4jDcGzO1hxSvUmZXIQKNI9Ji53gChrZG3qLp/Pxxbcw9nxC6G
TPfgy1Cj5E/LEkkHcgbRguuz/7Vvrw+0t3tqm/FTp1xwQ6IQ3by2/UIdzw4sZKkE
ZqfYywKBgGev+w+elv+9l0THXARnOYsp9Y+T/aGGvxPk22qGnXb2nofaqDiykg/e
reY2719w67ZLmlTm3Tg/y47zAwwEs7e32jC6ZIxFHofX8n/4y0AvZcICCsTv5y6f
CJzA7ItCDVGmrnkJjPlRWB6bIi8IA6LTnBNsxiz5nAFVMjG/v+HU
-----END RSA PRIVATE KEY-----)",
//  .if_name = "eno1",
  .if_name = "eth0",
//  .if_addr = {0x94, 0xD9, 0xB3, 0xA1, 0xB7, 0x23},
  .if_addr = {0xEE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
  .port = 8443,
  .min_port = 10000,
  .max_port = 30000,
  .max_conn = 10,
  .focus = "108.160.166.61",
};

Server* server;


int main (int argc, char** argv) {
  TRACE
  server = new Server(config);
  signal(SIGINT, [] (int sig) {
    server->shutdown();
    abort();
  });
  server->run();
  return 0;
}